package com.example.administrator.printoutindemo.http;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.example.administrator.printoutindemo.mvp.ui.entity.CangKu_ZhiJianWanCheng;
import com.example.administrator.printoutindemo.mvp.ui.entity.CangWeiLieBiao;
import com.example.administrator.printoutindemo.mvp.ui.entity.ChuKu;
import com.example.administrator.printoutindemo.mvp.ui.entity.ChuKuQingKuang;
import com.example.administrator.printoutindemo.mvp.ui.entity.DaiLingLiao;
import com.example.administrator.printoutindemo.mvp.ui.entity.DaiShenPi;
import com.example.administrator.printoutindemo.mvp.ui.entity.JiShuQueRen;
import com.example.administrator.printoutindemo.mvp.ui.entity.KuCun;
import com.example.administrator.printoutindemo.mvp.ui.entity.LingLiaoShenQingQingDan;
import com.example.administrator.printoutindemo.mvp.ui.entity.Login_GongJu;
import com.example.administrator.printoutindemo.mvp.ui.entity.MainNengLiangE;
import com.example.administrator.printoutindemo.mvp.ui.entity.PanDian;
import com.example.administrator.printoutindemo.mvp.ui.entity.ProjectTechConfirmInfo;
import com.example.administrator.printoutindemo.mvp.ui.entity.QianDao;
import com.example.administrator.printoutindemo.mvp.ui.entity.RuKu;
import com.example.administrator.printoutindemo.mvp.ui.entity.RuKuChengGongJiLu;
import com.example.administrator.printoutindemo.mvp.ui.entity.RuKuChengGongJiLuWuLiaoTuPian;
import com.example.administrator.printoutindemo.mvp.ui.entity.RuKuQingKuang;
import com.example.administrator.printoutindemo.mvp.ui.entity.RuKu_ZhiJianWanCheng;
import com.example.administrator.printoutindemo.mvp.ui.entity.SaoMiaoCangWeiMa;
import com.example.administrator.printoutindemo.mvp.ui.entity.SaoMiaoChaKanXiangQing;
import com.example.administrator.printoutindemo.mvp.ui.entity.SaoMiaoFenMa;
import com.example.administrator.printoutindemo.mvp.ui.entity.XiuGaiBeiZhu;
import com.example.administrator.printoutindemo.mvp.ui.entity.XunJian;
import com.example.administrator.printoutindemo.mvp.ui.entity.ZhouBao;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;


public interface ApiService {

    @GET()
    Observable<String> get(@Url String url, @QueryMap Map<String, String> params);

    @GET()
    Observable<String> get(@Url String url);

    @FormUrlEncoded
    @POST()
    Observable<String> post(@Url String url, @FieldMap Map<String, String> params);

    @POST()
    Observable<String> post(@Url String url);

    //    @Multipart
    //    @POST("upload")
    //    Call<ResponseBody> upload(@Part("description") RequestBody description,
    //                              @Part MultipartBody.Part file);

    @Multipart
    @POST()
    Observable<String> upload(@Url String url, @PartMap Map<String, String> params, @Part MultipartBody.Part file);

    @Streaming
    @GET()
    Call<ResponseBody> download(@Url String url);

    @FormUrlEncoded
    @POST()
    Observable<String> post(@Url String url, @JSONField JSONObject json);

    @GET
    Observable<ResponseBody> downloadFileFromNet(@Url String fileUrl);

    Observable<MainNengLiangE> getMainNengLiangEData();

    Observable<LingLiaoShenQingQingDan> getLingLiaoShenQingQingDanData();

    Observable<RuKu> getRuKuData();

    Observable<RuKuChengGongJiLu> getRuKuChengGongJiLuData();

    Observable<ChuKu> getChuKuData();

    Observable<DaiShenPi> getDaiShenPiData();

    Observable<DaiLingLiao> getDaiLingLiaoData();

    Observable<SaoMiaoChaKanXiangQing> getSaoMiaoChaKanXiangQingData();

    Observable<KuCun> getKuCunData();

    Observable<ChuKuQingKuang> getChuKuQingKuangData();

    Observable<RuKuQingKuang> getRuKuQingKuangData();

    Observable<ZhouBao> getZhouBaoData();

    Observable<PanDian> getPanDianData();

    /**
     * 获取公司的统计数据
     *
     * @param strCompanyId
     * @return
     */
    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetEntityCompanyProductInfo")
    Observable<String> getShengChanDiaoDuData(@Query("strCompanyId") String strCompanyId);

    /**
     * 获取公司的技术确认
     *
     * @param strCompanyId
     * @return
     */
    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetListCompanyTechConfirmInfo")
    Observable<String> getJiShuQueRenPieData(@Query("strCompanyId") String strCompanyId);

    Observable<JiShuQueRen> getJiShuQueRenData();

    Observable<ProjectTechConfirmInfo> getProjectTechConfirmInfoData();

    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetListProjectTechConfirmInfo")
    Observable<String> getJiShuQueRenProjectData(@Query("strCompanyId") String strCompanyId, @Query("strProjectId") String strProjectId);

    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetEntityCompanyProductInfo")
    Observable<String> getZhiHuiCangChuData(@Query("strCompanyId") String strCompanyId);

    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetEntityCompanyProductInfo")
    Observable<String> getShanDianPeiSongData(@Query("strCompanyId") String strCompanyId);

    @GET("http://dezhou.xywuhe.com:1717/BigScreenWebService.asmx/GetEntityCompanyProductInfo")
    Observable<String> getZhuanYeAnZhuangData(@Query("strCompanyId") String strCompanyId);

    Observable<QianDao> getQianDaoData(Map<String, String> map);

    Observable<RuKuChengGongJiLuWuLiaoTuPian> getRuKuChengGongJiLuWuLiaoTuPianData(Map<String, String> map);

    Observable<XiuGaiBeiZhu> getXiuGaiBeiZhuData(Map<String, String> map);

    Observable<RuKu_ZhiJianWanCheng> getRuKu_ZhiJianWanChengData(Map<String, String> map);

    Observable<CangKu_ZhiJianWanCheng> getCangKu_ZhiJianWanChengData(Map<String, String> map);

    Observable<SaoMiaoFenMa> getSaoMiaoFenMaData(Map<String, String> map);

    Observable<XunJian> getXunJianData(Map<String, String> map);

    Observable<CangWeiLieBiao> getCangWeiLieBiaoList(Map<String, String> map);

    Observable<SaoMiaoCangWeiMa> getSaoMiaoCangWeiMaList(Map<String, String> map);

    @GET("api/Account/get")
    Observable<Login_GongJu> getLogin_GongJuData(@QueryMap Map<String, String> map);
}
